package com.chatdating.mapper;

import com.chatdating.entity.dto.RecordMatchDto;
import org.apache.ibatis.annotations.*;

@Mapper
public interface RecordMatchMapper {

    @Select("SELECT * FROM match_form WHERE uid = #{userId}")
    RecordMatchDto findOne(Integer userId);

    @Insert("insert into match_form (uid,start,currently_user_id,num) values (#{userId},#{start},#{currently_user_id},#{num})")
    void insertOne(@Param("userId") Integer userId,@Param("start") int i,@Param("currently_user_id") int i1,@Param("num") int i2);

    @Update("update match_form set num=#{num} where uid=#{userId}")
    void setOneNum(@Param("userId") Integer userId,@Param("num") int i);

    @Update("update match_form set start=#{i}")
    void updataStart(int i);

    @Update("update match_form set currently_user_id=#{currently} where uid=#{userId}")
    void updataCurrently(@Param("userId") Integer userId,@Param("currently")  int currently);

    @Update("update match_form set start=#{start} where uid=#{userId}")
    void updataStartOne(@Param("userId") Integer userId,@Param("start") int start);
}
